<%--
  Created by IntelliJ IDEA.
  User: 刘洪兆0720
  Date: 2022/4/27
  Time: 20:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>登录</title>

    <link href="${path}/static/bootstrap/css/style_login.css" rel="stylesheet"/>
    <link href="${path}/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <script type="text/javascript">
        function isLogin() {
            $.get("${path}/getStartExam_Student", function (data) {
                if (data == null || data == "" || data == NaN || data == undefined || data == "200") {
                    $("#tip").html("当前没有进行中的考试，不能登陆");
                    $("#sutdentSignIn").attr("disabled", true);
                } else {
                    $("#sutdentSignIn").attr("disabled", false);
                    var str = "您当前的 " + data + " 考试正在进行中...";
                    $("#tip").html(str);
                }
            })
        }
    </script>
</head>
<body onload="isLogin()">
<div class="container" style="width: 90%; ">
    <div style="text-align: center; background-color: black;" class="row panel panel-default center">
        <strong id="tip" style="color: whitesmoke; text-align: center; font-size: 20px"></strong>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <form class="form-horizonta form-signinl" onsubmit="return LoginValidate()" role="form"
                  action="${path}/studentLogin" method="post" id="receptionLogin" name="receptionLogin">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">学&emsp;号</label>
                    <div class="col-sm-10" style="height: 80px; left: 8%">
                        <input class="form-control" name="stu_id" id="inputEmail3" type="text" placeholder="请输入学号"/>
                        <label style="color: red; font-size: 12px;" id="studentAccountMsg"></label>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">姓名/IP</label>
                    <div class="col-sm-10" style="height: 70px; left: 8%">
                        <input class="form-control" name="stu_name" id="inputPassword3" type="text"
                               placeholder="请输入姓名/IP地址"/>
                        <label style="color: red; font-size: 16px;" id="studentPwdMsg"></label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10" style="left: 20px">
                        <button type="submit" class="btn btn-default btn-lg btn-success btn-block"
                                id="sutdentSignIn" style="width: 85%;">登 录
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</div>
<script src="${path}/static/bootstrap/js/jquery-1.11.1.min.js"></script>
<script src="${path}/static/bootstrap/js/bootstrap.min.js"></script>
<script src="${path}/static/bootstrap/js/login.js"></script>
</body>
</html>